<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label">操作类型</label>
            <div class="layui-input-block">
                <input type="radio" name="type" value="0" title="其它操作" lay-filter="demo-radio-filter" {if $row.type eq 0}checked{/if} >
                <input type="radio" name="type" value="1" title="发货" lay-filter="demo-radio-filter" {if $row.type eq 1}checked{/if} >
                <input type="radio" name="type" value="2" lay-filter="demo-radio-filter" title="确认收货" {if $row.type eq 2}checked{/if}>
            </div>
        </div>

        <div class="layui-form-item" id="kdgs">
            <label class="layui-form-label">快递公司</label>
            <div class="layui-input-block">
                <select name="delivery_name" id="delivery_name" lay-filter="delivery_name"  data-select="{:url('jizhan.store_order/getExpressList')}" data-fields="name,express" data-value="{$row.delivery_name|default=''}" lay-search="">
                    <option value="">请选择快递公司</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item" id="kddh">
            <label class="layui-form-label">快递单号</label>
            <div class="layui-input-block">
                <input type="text" name="delivery_id" class="layui-input" placeholder="请输入快递单号" value="{$row.delivery_id|default=''}">
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注信息</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$row.remark|default=''}</textarea>
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script>
    layui.use(['form'],function(){
        var form = layui.form;

        // 默认隐藏
        $('#kdgs').hide();
        $('#kddh').hide();

        // 监听是否选中发货
        form.on('radio(demo-radio-filter)', function (data) {
            // console.log(data.elem); //得到radio原始DOM对象
            // console.log(data.value); //被点击的radio的value值
            if(data.value == 1){
                $('#kdgs').show();
                $('#kddh').show();
            }else{
                $('#kdgs').hide();
                $('#kddh').hide();
            }
        });
    });
</script>